"""
@name : shopping.main
@author : ysy
@projectname: tlbb
"""

import shopping_tools

while True:

    # 显示菜单信息
    shopping_tools.show_menu()

    user_choice = input("请输入您的选择：")
    print(f"您的选择是【{user_choice}】")

    # 针对用户的选择做判断
    if user_choice in ["1","2","3","4"]:

        # 1.登录
        if user_choice == "1":
            shopping_tools.user_login()

        # 2.注册
        elif user_choice == "2":
            shopping_tools.user_register()

        # 3.查看商品
        elif user_choice == "3":
            shopping_tools.show_goods()

        # 4.购买商品
        elif user_choice == "4":
            shopping_tools.buy_goods()

    elif user_choice == "exit":
        print("欢迎再次使用【三乐购物系统】！")
        break

    else:
        print("您的输入不正确，请重新选择！")












